06. Code cells
Code cells
Most of your work in notebooks will be done in code cells. This is where you write your code and it gets executed. In code cells you can write any code, assigning variables, defining functions and classes, importing packages, and more. Any code executed in one cell is available in all other cells.
To give you some practice, I created a notebook you can work through. Download the notebook
Working With Code Cells
below then run it from your own notebook server. (In your terminal, change to the directory with the notebook file, then enter
jupyter notebook
) Your browser might try to open the notebook file without downloading it. If that happens, right click on the link then choose "Save Link As…"